
aux_source_directory(. SRC)

set(LIB pthread thrdpool)
set(INCLUDE ${PROJECT_SOURCE_DIR}/src)

foreach(FILE_PATH ${SRC})
	string(REGEX REPLACE ".+/(.+)\\..*" "\\1" FILE_NAME ${FILE_PATH})
	list(FIND NOT_COMPILE ${FILE_NAME} RESULT)
	if(${RESULT} EQUAL -1)
		message(${FILE_NAME})
		include_directories(${INCLUDE})
		add_executable(${FILE_NAME} ${FILE_PATH})
		target_link_libraries(${FILE_NAME} ${LIB})
	endif()
endforeach()